package ysq.xyg.recovery.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 回收金模块-权限用户表实体类
 *
 * @author congcong tao
 * @date 2019-9-18 15:15:22
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_recovery_power_member")
public class PowerMember implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 商品兑换-会员ID
     */ 
	@Column(name = "item_member_id")
	private String itemMemberId;

	/**
	 * 提现-会员ID
	 */
	@Column(name = "withdraw_member_id")
	private String withdrawMemberId;

	/**
	 * 预约-会员ID
	 */
	@Column(name = "order_member_id")
	private String orderMemberId;

	/**
	 * 名片-会员ID
	 */
	@Column(name = "card_member_id")
	private String cardMemberId;

	/**
     * 创建者
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 更新者
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	@Transient
	private String orderMemberCardNo;

	@Transient
	private String orderMemberNickName;

	@Transient
	private String itemMemberCardNo;

	@Transient
	private String itemMemberNickName;

	@Transient
	private String withdrawMemberCardNo;

	@Transient
	private String withdrawMemberNickName;

	@Transient
	private String cardMemberCardNo;

	@Transient
	private String cardMemberNickName;

	public PowerMember(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}